package com.xls.commonlibrary.db.test;

import io.objectbox.annotation.Entity;
import io.objectbox.annotation.Id;

//@Entity
public class DB {    //  使用案例


//    @Id(assignable = true)  //assignable= true可以手动指定id值，出现相同会替换；不写这个给id赋值会报错
    public long id = 0; // 主键 一般【不需要改】，自增的，替换就用id来替换

    public String time = "";
    public String ecpm = "";

    public DB(String time, String ecpm) {
        this.time = time;
        this.ecpm = ecpm;
    }

    @Override
    public String toString() {
        return "DB{" +
                "id=" + id +
                ", time='" + time + '\'' +
                ", ecpm='" + ecpm + '\'' +
                '}';
    }

//    public String getContent() {
//        return
//                " id=" + id +
//                        "\n time=" + DateUtil.getReadableDate(time) +
//                        "\n ecpm=" + ecpm ;
//    }


    public long getId() {
        return id;
    }

    public void setId(long id) {
        this.id = id;
    }

    public String getTime() {
        return time;
    }

    public void setTime(String time) {
        this.time = time;
    }

    public String getEcpm() {
        return ecpm;
    }

    public void setEcpm(String ecpm) {
        this.ecpm = ecpm;
    }
}
